package com.shop.cloud.model.response;

import java.util.Collection;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.google.common.collect.ImmutableList;

import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author Alex
 */
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler", "fieldHandler" }, ignoreUnknown = true)
public class ObjectCollectionResponse<T> extends RestfulResponse {

	private static final long serialVersionUID = 1862906172390850647L;

	private Collection<T> dataSet;

	public ObjectCollectionResponse(Collection<T> dataSet) {
		this.dataSet = ImmutableList.copyOf(dataSet);
	}

	public Collection<T> getDataSet() {
		return dataSet;
	}

	public void setDataSet(Collection<T> dataSet) {
		this.dataSet = dataSet;
	}

}
